package ga.wavaplayer.ui.buttons {
	
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	public class WDualStateButton extends Sprite {
		
		private var _states:Array = [ ];
		private var _currentState:int;
		
		public function WDualStateButton(pState0:WButton, pState1:WButton, pDefaultState:uint = 0 ) {
			_states.push(pState0);
			_states.push(pState1);
			
			_currentState = pDefaultState;
			
			this.addChild(_states[_currentState]);
		}
		
		public function setState(pState:uint):void {
			this.removeChild(_states[_currentState]);
			_currentState = pState;
			this.addChild(_states[_currentState]);
		}
	}
}
